Constraint placement

Hi all

I would like to create a frame that contains 2 other frames with same width. One on the left and the other one on the right in the main frame.

When I run the following code, only the first one appears !!!!

DB ctlBox = create("test", styleFloating|styleCentered)
 
DBE mainFrame = frame(ctlBox , "Parameters", 650, 100)
mainFrame->"bottom"->"form"    
 
DBE leftFrame = frame(ctlBox , "Export content",300, 20)
leftFrame->"top"->"inside"->mainFrame
leftFrame->"left"->"inside"->mainFrame
leftFrame->"bottom"->"inside"->mainFrame
 
 
DBE rightFrame = frame(ctlBox , "Export classification", 300, 20)
rightFrame->"top"->"inside"->mainFrame
rightFrame->"left"->"spaced"->leftFrame
rightFrame->"right"->"inside"->mainFrame
 
show ctlBox


Any idea about the problem ?

Thanks and regards


SystemAdmin - Mon Jun 06 09:52:41 EDT 2011

Re: Constraint placement
Tony_Goodman - Mon Jun 06 10:32:52 EDT 2011

Constrained placement is a black art! This does it.
 

DB ctlBox = create("test", styleFloating|styleCentered)
 
DBE mainFrame = frame(ctlBox , "Parameters", 650, 100)
mainFrame->"bottom"->"form"    
 
DBE leftFrame = frame(ctlBox , "Export content",300, 20)
leftFrame->"top"->"inside"->mainFrame
leftFrame->"left"->"inside"->mainFrame
leftFrame->"right"->"unattached"
leftFrame->"bottom"->"inside"->mainFrame
 
 
DBE rightFrame = frame(ctlBox , "Export classification", 300, 20)
rightFrame->"top"->"inside"->mainFrame
rightFrame->"left"->"flush"->leftFrame
rightFrame->"right"->"inside"->mainFrame
rightFrame->"bottom"->"inside"->mainFrame
 
show ctlBox

 


Tony Goodman, Smart DXL Limited

 

Re: Constraint placement
llandale - Mon Jun 06 15:54:34 EDT 2011

Tony_Goodman - Mon Jun 06 10:32:52 EDT 2011

Constrained placement is a black art! This does it.
 

DB ctlBox = create("test", styleFloating|styleCentered)
 
DBE mainFrame = frame(ctlBox , "Parameters", 650, 100)
mainFrame->"bottom"->"form"    
 
DBE leftFrame = frame(ctlBox , "Export content",300, 20)
leftFrame->"top"->"inside"->mainFrame
leftFrame->"left"->"inside"->mainFrame
leftFrame->"right"->"unattached"
leftFrame->"bottom"->"inside"->mainFrame
 
 
DBE rightFrame = frame(ctlBox , "Export classification", 300, 20)
rightFrame->"top"->"inside"->mainFrame
rightFrame->"left"->"flush"->leftFrame
rightFrame->"right"->"inside"->mainFrame
rightFrame->"bottom"->"inside"->mainFrame
 
show ctlBox

 


Tony Goodman, Smart DXL Limited

 

'Black Art' indeed. The various DBE Elements behave differently with the same contrained placement commands. And I'm pretty sure they behave variably, just for me. I've created 100s of production dialog boxes and can safely say that I have NEVER successfully coded the contrained placement correctly the first time. My initial guess is usually fair, followed by a very aggrevating period of monkey-at-the-typewriter trial and error accompanied by a variety of perfectly appropriate curses. I admit I often commit the cardinal sin against the SHDF, the "Society of Haughty Dialog Folks" by resorting to adding labels with spaces to make things line up right. ..err.. left .. whatever.

There are some folks with sharp precise minds that can keep it all straight, I'm not one of them.

  • Louie

BTW, the key to the cardinal 'Sin' is to define a label with text, but then set the label to null after the dialog is realized. You can get vertical gradients by using letters and also EOL in the initial definition.